[codex] fix Windows one-click apply handoff - #317
Merged
Conversation
Owner
Author
|
Update after Windows-side testing and #307 reporter logs:
Retest request for Windows machine:
|
Fei-Away
marked this pull request as ready for review
July 30, 2026 10:41
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This fixes the remaining #307 Windows one-click apply path after v1.5.8 restored startup and ZIP import.
There are seven fixes in this PR:
{sysnative}for Setup-owned PowerShell execution, but persistent shortcuts and the HKCUdreamskin://protocol command now use{win}\System32\WindowsPowerShell\v1.0\powershell.exe, which 64-bit browser/Explorer launchers can accessdreamskin://apply?version=ver_...and the Windows/browser-normalized URIdreamskin://apply/?version=ver_...colors; Windows no longer requires, creates, reads, or emits the oldpaletteruntime field in its PowerShell store / injector paththeme-windows.ps1, so it can resolveGet-DreamSkinThemePathsand verify the active theme directory outside the tray/start scripts--onceapply of the exact active theme, then verify again before deciding to rollbackThe protocol parser remains fail-closed for non-canonical inputs: extra parameters, fragments, uppercase scheme/version IDs, double-slash paths, arbitrary paths, and URL/path injection are still rejected by regression tests.
Why
#307 reporter confirmed on Windows 11 + Chrome that v1.5.8 restored startup and ZIP import, but one-click apply still fell back to the website's “client not detected / download ZIP” hint.
Windows-side testing then showed separate layers:
{sysnative}path.dreamskin://apply/?version=..., while the old parser accepted onlydreamskin://apply?version=....paletteproperty that is not part of the current shared community schema.Get-DreamSkinThemePaths is not recognizedbecause it loadedcommon-windows.ps1but nottheme-windows.ps1.Start-Process -Waitforstart-dream-skin.ps1; if that child process did not exit cleanly after renderer recovery/final verification, the protocol handler could sit with no visible window for minutes even though rollback/final state had already completed.74927d4proved the previous layers were fixed, but the final target theme still failed visible verification and rolled back cleanly to Gothic Void Crusade. This exposed two Windows/macOS behavior gaps: Windows had an older fixed 2..4 home-card verification gate, and Windows did not do macOS's activate + forced one-shot retry after the first verify miss.CI / validation
Latest PR head at the time of this note:
71c3ca9.Local checks before push:
node --check windows/scripts/injector.mjsnode windows/tests/injector-window-readiness.test.mjsnode windows/tests/injector-bootstrap.test.mjsnode windows/scripts/injector.mjs --check-payload --theme-dir <downloaded ver_6e5527257d304daca9d5 package>git diff --checkcolors/no-paletteWindows payload contract, standalone Verify dependency, bounded one-click start verification, Windows/macOS-aligned home verification, and activate + forced once retryCI must pass on the latest head before merge. Earlier CI run
30528814057passed on74927d4; a newer run is required for71c3ca9because this PR now also changes Windows renderer verification and startup retry behavior.Windows AI verification notes / 给 Windows 测试 AI 的说明
Scope: this PR verifies the Windows one-click flow for #307 from browser handoff through native confirmation, download/import, applying a current community theme, visible renderer verification, and bounded handler exit. Do not close #307 from this PR alone; after release, affected users still need to confirm recovery.
1. Checkout and confirm exact PR head
Expected head at the time of this note:
71c3ca9or newer.2. Run source-level Windows checks
From the repository root:
These must pass. Relevant coverage:
windows\tests\community-theme-link.tests.ps1: accepts canonical and Windows-normalizeddreamskin://URI forms, rejects unsafe forms, and asserts the one-click hidden start/verify child has a bounded waitwindows\tests\theme-zip-import.tests.ps1: imports and applies current community/Studio packages without introducing legacypalettewindows\tests\injector-window-readiness.test.mjs: verifies Windows native-window fallback, exact payload binding, and macOS-aligned home verification without a fixed suggestion-card countwindows\tests\run-tests.ps1: validates the Windows injector payload does not drift from the shared community theme contract, confirms standalone Verify loads the theme-store helpers it calls, and asserts startup has activate + forced--onceretry after an initial verify miss3. Build a local Setup.exe from the PR
If Inno Setup 6 is installed:
4. Install/upgrade safely
Before running Setup.exe, close Codex and exit the Codex Dream Skin tray. The installer intentionally refuses to proceed while Codex is running; that refusal is a safety guard, not a PR failure.
Run the PR-built Setup.exe and complete installation.
5. Verify the registered protocol command
After installation:
Expected: the command contains
\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, does not containsysnative, and points to the installedapply-community-theme.ps1under%LOCALAPPDATA%\CodexDreamSkin\engine\scripts.6. Verify standalone Verify no longer misses theme helpers
After installing and starting DreamSkin once, run:
Expected: it must not fail with
Get-DreamSkinThemePaths is not recognized. A renderer mismatch or Codex-not-running error is a different runtime state issue; classify it separately.7. Verify both URI forms reach the native handler
Use either
Win + Rmanually or PowerShell ShellExecute:Expected: DreamSkin native confirmation dialog appears. Cancel is acceptable for this handoff check; the important part is that the native dialog appears for both URI forms.
8. Verify browser handoff and full one-click apply
Open Windows 11 Chrome or Edge and click
一键换肤on either:https://dreamskin.cc/galleryhttps://dreamskin.cc/preview?themeVersion=ver_6e5527257d304daca9d5Expected full flow:
The property 'palette' cannot be found on this objectThe imported theme failed visible verification. The previous theme was reapplied and visibly verified.forver_6e5527257d304daca9d5Important Chrome note: if the user previously selected “always allow/open this app”, Chrome may no longer show the browser external-app prompt. That is not automatically a failure. The pass/fail signal is whether the DreamSkin native confirmation dialog appears and the apply operation completes.
9. If it fails, classify the exact stage
Please report one of these with screenshot/logs:
Start-Processlaunches PowerShell, but no DreamSkin dialog appears.Get-DreamSkinThemePaths is not recognized.Case 1/2 is still protocol handoff. Case 3/4 is a later handler/import/apply-stage issue and should include the DreamSkin error dialog text. Case 5 is the bounded child start/verify wait path changed by this PR and needs process/log evidence. Case 7 is the visible-verification path changed by
71c3ca9; include%LOCALAPPDATA%\CodexDreamSkin\verify.log,injector.log, andinjector-error.logif available.Notes